﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Qcy.Jshj.Web.Models
{
    public class Product
    {
        [Key]
        public int Id { get; set; }

        public string Title { get; set; }
        public string TitleEn { get; set; }
        public ProductCategory Category { get; set; }
        public bool IndexShow { get; set; }
        public string CategoryName { get { return Category != null ? Category.FullName : ""; } }
        public string CategoryNameEn { get { return Category != null ? Category.FullNameEn : ""; } }
        public string Pictures { get; set; }
        public string Contents { get; set; }
        public string ContentsEn { get; set; }
        public DateTime CreationDate { get; set; }
        public string CreationDateString { get { return CreationDate.ToString("yyyy年MM月dd日"); } }

    }
}